# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-dotty-dict
pkgver=1.3.1
pkgrel=4
pkgdesc="Dictionary wrapper for quick access to deeply nested keys"
url="https://github.com/pawelzny/dotty_dict"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-poetry-core py3-gpep517"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/pawelzny/dotty_dict/archive/v$pkgver.tar.gz"
builddir="$srcdir/dotty_dict-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
a70cc8a7d8d60c918dc735d7ae2675f20f9558be75c7ae2b124597e35eac1dad47f3733774ce782854bc98665f515d5d8d1e0b26d8f0ba4e4a107ab95933d59f  py3-dotty-dict-1.3.1.tar.gz
"
